<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>虚拟列表</title>
		<style type="text/css">
			.container{}
			.container li{height: 50px;line-height: 50px;border-bottom: 1px solid #eee;}
		</style>
	</head>
	<body>
		<button id="btn">按钮</button>
		<ul class="container">
			
		</ul>
		<script type="text/javascript">
			document.getElementById('btn').onclick=function(){
				var now = Date.now()
				var count = 10000;
				var container = document.querySelector('.container')
				for(var i =0;i<count;i++){
					var li = document.createElement('li');
					li.innerText = '第'+i+'项';
					container.appendChild(li)
				}
				console.log(Date.now()-now)
				setTimeout(function(){
					console.log(Date.now()-now)
				},0)
			}
		</script>
		
	</body>
</html>
